package com.tanhua.manage.util;

import com.tanhua.manage.pojo.Admin;

/**
 * @author 西楚霸王
 * @date 2020/12/4 8:49
 */
public class UserThreadLocal {
    private static final ThreadLocal<Admin>LOCAL = new ThreadLocal<>();

    private UserThreadLocal(){

    }

    public static void set(Admin admin){
        LOCAL.set(admin);
    }

    public static Admin get(){
        return LOCAL.get();
    }

    public static void remove(){
        LOCAL.remove();
    }
}
